package com.thrd.taiexhibition.activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;

import com.facebook.drawee.generic.RoundingParams;
import com.thrd.taiexhibition.R;
import com.thrd.taiexhibition.bean.BaseActivity;
import com.thrd.taiexhibition.fresco.FrescoImage;
import com.thrd.taiexhibition.fresco.FrescoUtils;

import org.jetbrains.annotations.Nullable;

/**
 * @author: ${唐杰}
 * @date: 2021/4/12
 */
public class QRcodeActivity extends BaseActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_qr_code);
        getWindow().setLayout(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT);
        FrescoImage frescoImage =findViewById(R.id.fi_code_image);
        FrameLayout backLayout =findViewById(R.id.fl_layout_code);
        Intent intent =getIntent();
        if(intent!=null){
            String url=intent.getStringExtra("URL");
            FrescoUtils.getInstance().setPrefixProgressLoad(this,frescoImage,url, RoundingParams.fromCornersRadius(5));
        }

        backLayout.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

    }
}
